@extends('backend::config.set_tab')
@section('rule-content')
    <style>
        .layui-timeline-item:before, hr {
            background-color: #999;
        }
    </style>
    <form id="config-update" action="{{url()->current()}}" method="post" class="mt-md-h">
        @foreach($rules as $rule)
            <div class="form-group">
                <div class="rule-column">
                    <div class="rule-title"><span>{{$rule->title}}</span></div>
                    <div class="rule-content">
                        @switch($rule->name)

                            @case('reg1')
                            <p>
                                购买
                                <input type="text" name="{{$rule['name']}}[rule1]"   value="{{$rule->rule1 ?? 0}}"
                                       class="form-control d-inline ipt-xs" style="width: 100px">
                                的成长值升级
                            </p>
                            @break
                            @case('reg2')
                            <p>
                                购买
                                <input type="text" name="{{$rule['name']}}[rule1]"   value="{{$rule->rule1 ?? 0}}"
                                       class="form-control d-inline ipt-xs" style="width: 100px">
                                的成长值升级
                            </p>
                            @break
                            @case('reg3')
                            <p>
                                购买
                                <input type="text" name="{{$rule['name']}}[rule1]"   value="{{$rule->rule1 ?? 0}}"
                                       class="form-control d-inline ipt-xs" style="width: 100px">
                                的成长值升级
                            </p>
                            @break
                            @case('reg4')
                            <p>
                                购买
                                <input type="text" name="{{$rule['name']}}[rule1]"   value="{{$rule->rule1 ?? 0}}"
                                       class="form-control d-inline ipt-xs" style="width: 100px">
                                的成长值升级
                            </p>
                            @break
                            @case('reg5')
                            <p>
                                购买
                                <input type="text" name="{{$rule['name']}}[rule1]"   value="{{$rule->rule1 ?? 0}}"
                                       class="form-control d-inline ipt-xs" style="width: 100px">
                                的成长值升级
                            </p>
                            @break
                            @case('reg6')
                            <p>
                                购买
                                <input type="text" name="{{$rule['name']}}[rule1]"   value="{{$rule->rule1 ?? 0}}"
                                       class="form-control d-inline ipt-xs" style="width: 100px">
                                的成长值升级
                            </p>
                            @break
                            @case('reg7')
                            <p>
                                购买
                                <input type="text" name="{{$rule['name']}}[rule1]"   value="{{$rule->rule1 ?? 0}}"
                                       class="form-control d-inline ipt-xs" style="width: 100px">
                                的成长值升级
                            </p>
                            @break
                            @case('reg7')
                            <p>
                                购买
                                <input type="text" name="{{$rule['name']}}[rule1]"   value="{{$rule->rule1 ?? 0}}"
                                       class="form-control d-inline ipt-xs" style="width: 100px">
                                的成长值升级
                            </p>
                            @break
                            @case('reg8')
                            <p>
                                购买
                                <input type="text" name="{{$rule['name']}}[rule1]"   value="{{$rule->rule1 ?? 0}}"
                                       class="form-control d-inline ipt-xs" style="width: 100px">
                                的成长值升级
                            </p>
                            @break
                            @case('reg9')
                            <p>
                                购买
                                <input type="text" name="{{$rule['name']}}[rule1]"   value="{{$rule->rule1 ?? 0}}"
                                       class="form-control d-inline ipt-xs" style="width: 100px">
                                的成长值升级
                            </p>
                            @break
                            @case('reg10')
                            <p>
                                购买
                                <input type="text" name="{{$rule['name']}}[rule1]"   value="{{$rule->rule1 ?? 0}}"
                                       class="form-control d-inline ipt-xs" style="width: 100px">
                                的成长值升级
                            </p>
                            @break
                            @case('reg11')
                            <p>
                                购买
                                <input type="text" name="{{$rule['name']}}[rule1]"   value="{{$rule->rule1 ?? 0}}"
                                       class="form-control d-inline ipt-xs" style="width: 100px">
                                的成长值升级
                            </p>
                            @break

                            @case('fensi3')
                            <p>
                                <input type="text" name="{{$rule['name']}}[rule1]"   value="{{$rule->rule1 ?? 0}}"
                                       class="form-control d-inline ipt-xs" style="width: 100px">
                                元
                            </p>
                            @break

                            @case('youbu1')
                            <p>
                                条件：有
                                <input type="text" name="{{$rule['name']}}[rule3]"   value="{{$rule->rule3 ?? 0}}"
                                       class="form-control d-inline ipt-xs" style="width: 100px">
                                贡献值。
                                每天
                                <input type="text" name="{{$rule['name']}}[rule1]"   value="{{$rule->rule1 ?? 0}}"
                                       class="form-control d-inline ipt-xs" style="width: 100px">
                                元油补。发放
                                <input type="text" name="{{$rule['name']}}[rule2]"   value="{{$rule->rule2 ?? 0}}"
                                       class="form-control d-inline ipt-xs" style="width: 100px">
                                天
                            </p>
                            @break
                            @case('youbu2')
                            <p>
                                条件：大车队有
                                <input type="text" name="{{$rule['name']}}[rule4]"   value="{{$rule->rule4 ?? 0}}"
                                       class="form-control d-inline ipt-xs" style="width: 100px">
                                活跃值，小车队之和有
                                <input type="text" name="{{$rule['name']}}[rule5]"   value="{{$rule->rule5 ?? 0}}"
                                       class="form-control d-inline ipt-xs" style="width: 100px">
                                活跃值。
                                每天
                                <input type="text" name="{{$rule['name']}}[rule1]"   value="{{$rule->rule1 ?? 0}}"
                                       class="form-control d-inline ipt-xs" style="width: 100px">
                                元油补。发放
                                <input type="text" name="{{$rule['name']}}[rule2]"   value="{{$rule->rule2 ?? 0}}"
                                       class="form-control d-inline ipt-xs" style="width: 100px">
                                天
                            </p>
                            @break
                            @case('youbu3')
                            <p>
                                条件：大车队有
                                <input type="text" name="{{$rule['name']}}[rule4]"   value="{{$rule->rule4 ?? 0}}"
                                       class="form-control d-inline ipt-xs" style="width: 100px">
                                活跃值，小车队之和有
                                <input type="text" name="{{$rule['name']}}[rule5]"   value="{{$rule->rule5 ?? 0}}"
                                       class="form-control d-inline ipt-xs" style="width: 100px">
                                活跃值。
                                每天
                                <input type="text" name="{{$rule['name']}}[rule1]"   value="{{$rule->rule1 ?? 0}}"
                                       class="form-control d-inline ipt-xs" style="width: 100px">
                                元油补。发放
                                <input type="text" name="{{$rule['name']}}[rule2]"   value="{{$rule->rule2 ?? 0}}"
                                       class="form-control d-inline ipt-xs" style="width: 100px">
                                天
                            </p>
                            @break
                            @case('youbu4')
                            <p>
                                条件：大车队有
                                <input type="text" name="{{$rule['name']}}[rule4]"   value="{{$rule->rule4 ?? 0}}"
                                       class="form-control d-inline ipt-xs" style="width: 100px">
                                活跃值，小车队之和有
                                <input type="text" name="{{$rule['name']}}[rule5]"   value="{{$rule->rule5 ?? 0}}"
                                       class="form-control d-inline ipt-xs" style="width: 100px">
                                活跃值。
                                每天
                                <input type="text" name="{{$rule['name']}}[rule1]"   value="{{$rule->rule1 ?? 0}}"
                                       class="form-control d-inline ipt-xs" style="width: 100px">
                                元油补。发放
                                <input type="text" name="{{$rule['name']}}[rule2]"   value="{{$rule->rule2 ?? 0}}"
                                       class="form-control d-inline ipt-xs" style="width: 100px">
                                天
                            </p>
                            @break
                            @case('youbu5')
                            <p>
                                条件：大车队有
                                <input type="text" name="{{$rule['name']}}[rule4]"   value="{{$rule->rule4 ?? 0}}"
                                       class="form-control d-inline ipt-xs" style="width: 100px">
                                活跃值，小车队之和有
                                <input type="text" name="{{$rule['name']}}[rule5]"   value="{{$rule->rule5 ?? 0}}"
                                       class="form-control d-inline ipt-xs" style="width: 100px">
                                活跃值。
                                每天
                                <input type="text" name="{{$rule['name']}}[rule1]"   value="{{$rule->rule1 ?? 0}}"
                                       class="form-control d-inline ipt-xs" style="width: 100px">
                                元油补。发放
                                <input type="text" name="{{$rule['name']}}[rule2]"   value="{{$rule->rule2 ?? 0}}"
                                       class="form-control d-inline ipt-xs" style="width: 100px">
                                天
                            </p>
                            @break
                            @case('youbu6')
                            <p>
                                条件：大车队有
                                <input type="text" name="{{$rule['name']}}[rule4]"   value="{{$rule->rule4 ?? 0}}"
                                       class="form-control d-inline ipt-xs" style="width: 100px">
                                活跃值，小车队之和有
                                <input type="text" name="{{$rule['name']}}[rule5]"   value="{{$rule->rule5 ?? 0}}"
                                       class="form-control d-inline ipt-xs" style="width: 100px">
                                活跃值。
                                每天
                                <input type="text" name="{{$rule['name']}}[rule1]"   value="{{$rule->rule1 ?? 0}}"
                                       class="form-control d-inline ipt-xs" style="width: 100px">
                                元油补。发放
                                <input type="text" name="{{$rule['name']}}[rule2]"   value="{{$rule->rule2 ?? 0}}"
                                       class="form-control d-inline ipt-xs" style="width: 100px">
                                天
                            </p>
                            @break
                            @case('youbu7')
                            <p>
                                条件：大车队有
                                <input type="text" name="{{$rule['name']}}[rule4]"   value="{{$rule->rule4 ?? 0}}"
                                       class="form-control d-inline ipt-xs" style="width: 100px">
                                活跃值，小车队之和有
                                <input type="text" name="{{$rule['name']}}[rule5]"   value="{{$rule->rule5 ?? 0}}"
                                       class="form-control d-inline ipt-xs" style="width: 100px">
                                活跃值。
                                每天
                                <input type="text" name="{{$rule['name']}}[rule1]"   value="{{$rule->rule1 ?? 0}}"
                                       class="form-control d-inline ipt-xs" style="width: 100px">
                                元油补。发放
                                <input type="text" name="{{$rule['name']}}[rule2]"   value="{{$rule->rule2 ?? 0}}"
                                       class="form-control d-inline ipt-xs" style="width: 100px">
                                天
                            </p>
                            @break
                            @case('youbu8')
                            <p>
                                条件：大车队有
                                <input type="text" name="{{$rule['name']}}[rule4]"   value="{{$rule->rule4 ?? 0}}"
                                       class="form-control d-inline ipt-xs" style="width: 100px">
                                活跃值，小车队之和有
                                <input type="text" name="{{$rule['name']}}[rule5]"   value="{{$rule->rule5 ?? 0}}"
                                       class="form-control d-inline ipt-xs" style="width: 100px">
                                活跃值。
                                每天
                                <input type="text" name="{{$rule['name']}}[rule1]"   value="{{$rule->rule1 ?? 0}}"
                                       class="form-control d-inline ipt-xs" style="width: 100px">
                                元油补。发放
                                <input type="text" name="{{$rule['name']}}[rule2]"   value="{{$rule->rule2 ?? 0}}"
                                       class="form-control d-inline ipt-xs" style="width: 100px">
                                天
                            </p>
                            @break
                            @case('youbu9')
                            <p>
                                条件：有
                                <input type="text" name="{{$rule['name']}}[rule6]"   value="{{$rule->rule6 ?? 0}}"
                                       class="form-control d-inline ipt-xs" style="width: 100px">
                                活跃值。
                                每天
                                <input type="text" name="{{$rule['name']}}[rule1]"   value="{{$rule->rule1 ?? 0}}"
                                       class="form-control d-inline ipt-xs" style="width: 100px">
                                元油补。发放
                                <input type="text" name="{{$rule['name']}}[rule2]"   value="{{$rule->rule2 ?? 0}}"
                                       class="form-control d-inline ipt-xs" style="width: 100px">
                                天
                            </p>
                            @break
                            @case('youbu10')
                            <p>
                                条件：有
                                <input type="text" name="{{$rule['name']}}[rule6]"   value="{{$rule->rule6 ?? 0}}"
                                       class="form-control d-inline ipt-xs" style="width: 100px">
                                活跃值。
                                每天
                                <input type="text" name="{{$rule['name']}}[rule1]"   value="{{$rule->rule1 ?? 0}}"
                                       class="form-control d-inline ipt-xs" style="width: 100px">
                                元油补。发放
                                <input type="text" name="{{$rule['name']}}[rule2]"   value="{{$rule->rule2 ?? 0}}"
                                       class="form-control d-inline ipt-xs" style="width: 100px">
                                天
                            </p>
                            @break
                            @case('youbu11')
                            <p>
                                条件：有
                                <input type="text" name="{{$rule['name']}}[rule6]"   value="{{$rule->rule6 ?? 0}}"
                                       class="form-control d-inline ipt-xs" style="width: 100px">
                                活跃值。
                                每天
                                <input type="text" name="{{$rule['name']}}[rule1]"   value="{{$rule->rule1 ?? 0}}"
                                       class="form-control d-inline ipt-xs" style="width: 100px">
                                元油补。发放
                                <input type="text" name="{{$rule['name']}}[rule2]"   value="{{$rule->rule2 ?? 0}}"
                                       class="form-control d-inline ipt-xs" style="width: 100px">
                                天
                            </p>
                            @break
                            @case('fee')
                            <p>
                                合计
                                <input type="text" name="{{$rule['name']}}[rule1]"   value="{{$rule->rule1 ?? 0}}"
                                       class="form-control d-inline ipt-xs" style="width: 100px">
                                %
                            </p>
                            @break
                            @default
                                <p><span>{{$rule->remark}}</span></p>
                        @endswitch
                    </div>
                    {{--<div class="rule-foot">
                        <span>
                            @component("backend::component.switch")
                                @slot('params'){"url":"{{route('b_Config_switchRule',['rule_id'=>$rule->id])}}","confirm":"true"} @endslot
                                @slot('checked') @if($rule->status == 1) checked @endif @endslot
                            @endcomponent
                        </span>
                    </div>--}}
                </div>
            </div>
            <hr/>

        @endforeach
            <div class="form-group">

                @component('backend::component.form.button')
                    @slot('title') 提交 @endslot
                    @slot('size') sm @endslot
                    @slot('color') danger @endslot
                    @slot('attr') style=margin-left:150px; @endslot
                    @slot('params') {"formId":"#config-update","loading":true} @endslot
                    @slot('class') btn-min-width ajax-form  @endslot
                @endcomponent

{{--                @component('backend::component.form.button')--}}
{{--                    @slot('title') 【测试】-工资结算 @endslot--}}
{{--                    @slot('color') danger @endslot--}}
{{--                    @slot('params') {"url":"{{route('b_Config_gongzi')}}","confirm":"true","title":"确定执行工资结算吗？"} @endslot--}}
{{--                    @slot('class') btn-ajax @endslot--}}
{{--                @endcomponent--}}

{{--                @component('backend::component.form.button')--}}
{{--                    @slot('title') 【测试】-检测复投 @endslot--}}
{{--                    @slot('color') danger @endslot--}}
{{--                    @slot('params') {"url":"{{route('b_Config_futou_cheak')}}","confirm":"true","title":"确定检测复投吗？"} @endslot--}}
{{--                    @slot('class') btn-ajax @endslot--}}
{{--                @endcomponent--}}

            </div>




    </form>

    <script>
    </script>
@endsection

